<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>QxOrm: qx::QxSoftDelete Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo_qxorm.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">QxOrm
   &#160;<span id="projectnumber">1.4.3</span>
   </div>
   <div id="projectbrief">C++ Object Relational Mapping library</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('classqx_1_1_qx_soft_delete.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a>  </div>
  <div class="headertitle">
<div class="title">qx::QxSoftDelete Class Reference<div class="ingroups"><a class="el" href="group___qx_dao.html">QxDao : QxOrm library database communication used by persistence engine (ORM - Object Relational Mapping)</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="qx::QxSoftDelete" -->
<p><a class="el" href="classqx_1_1_qx_soft_delete.html" title="qx::QxSoftDelete : soft delete (or logical delete) behavior to update a row into database (flag it as...">qx::QxSoftDelete</a> : soft delete (or logical delete) behavior to update a row into database (flag it as deleted) instead of delete it from database  
 <a href="classqx_1_1_qx_soft_delete.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_qx_soft_delete_8h_source.html">QxSoftDelete.h</a>&gt;</code></p>

<p><a href="classqx_1_1_qx_soft_delete-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#a6a794b3eea9d7a11edab6b1f06ea153a">mode</a> { <a class="el" href="classqx_1_1_qx_soft_delete.html#a6a794b3eea9d7a11edab6b1f06ea153aa11d2d9195b9aebf7c74f90f951bbae69">mode_flag</a>, 
<a class="el" href="classqx_1_1_qx_soft_delete.html#a6a794b3eea9d7a11edab6b1f06ea153aaa6026166a7c346ac77896d71d8e0816d">mode_date_time</a>
 }</td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#a7e49357973b451cb50a0acae4f996ef4">QxSoftDelete</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#a816d67d204827448a4c234785b0b410d">QxSoftDelete</a> (const QString &amp;sColumn)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#ab1d9d6eda63d04035a395ccc5ccadd46">QxSoftDelete</a> (const QString &amp;sColumn, <a class="el" href="classqx_1_1_qx_soft_delete.html#a6a794b3eea9d7a11edab6b1f06ea153a">mode</a> eMode)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#aea32113e4ed3c93080ccc5755209dc52">~QxSoftDelete</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#a8ae62bc1d975bc062a1111d473915ce1">getTableName</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#a9891f7ba304a031b28eeff680c0cb419">getColumnName</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#ab7fb7cfc186d051d0a53070ca6a83828">getSqlQueryToFetch</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#ae9b9b56b123b9cccdcceab8769de1de8">getSqlQueryToUpdate</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#af01bab27ed138ac8464ee46e29031908">getSqlQueryToCreateTable</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classqx_1_1_qx_soft_delete.html#a6a794b3eea9d7a11edab6b1f06ea153a">mode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#a6d37d5b614a1e1a2e19eb4b4357aefed">getMode</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#a60ac45e661187ea2e4aef088322cbb76">setTableName</a> (const QString &amp;sTable)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#a91e15be206be59bde4a58888ab27d083">setColumnName</a> (const QString &amp;sColumn)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#a8a2fd4b776e9bcbd475e7d38b04b2faa">setSqlQueryToFetch</a> (const QString &amp;s)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#a6a94b8ab9eaeb6e59d678462062b3061">setSqlQueryToUpdate</a> (const QString &amp;s)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#aac330136e9f3b673f7ce852e65d3f91d">setSqlQueryToCreateTable</a> (const QString &amp;s)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#ad378d7962f669c70c010dc72763a5151">setMode</a> (<a class="el" href="classqx_1_1_qx_soft_delete.html#a6a794b3eea9d7a11edab6b1f06ea153a">mode</a> eMode)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#a217c44a367c086bc8875f696cc6a563a">isEmpty</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#a793d37737e8e7a76aef407e5e39d2195">buildSqlTablePointName</a> (const QString &amp;sTable=QString()) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#acfe4afc28ace99a33a774447a73e81c7">buildSqlQueryToFetch</a> (const QString &amp;sTable=QString()) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#a5a25cd00c63711bbcd6638bca97040c3">buildSqlQueryToUpdate</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#aedaf8b286967a621b7c15db6deafe567">buildSqlQueryToCreateTable</a> () const </td></tr>
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#a47ff4d3c3a26e02c278dd7724205b665">m_sTable</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Table name where soft delete behavior is applied.  <a href="#a47ff4d3c3a26e02c278dd7724205b665"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#a96138dfa61b315dad3353541ae2d7acd">m_sColumn</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Column name to store soft delete information.  <a href="#a96138dfa61b315dad3353541ae2d7acd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#a587b25ab60a14ca67527dd4ba3f98032">m_sSqlQueryToFetch</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Overrided user SQL query to fetch an item, if empty QxOrm library builds a default SQL query.  <a href="#a587b25ab60a14ca67527dd4ba3f98032"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#ad5ac6cc751306623e019c065cefc8cd6">m_sSqlQueryToUpdate</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Overrided user SQL query to update an item, if empty QxOrm library builds a default SQL query.  <a href="#ad5ac6cc751306623e019c065cefc8cd6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#afb3d2d5a9137471709c49f69830defc8">m_sSqlQueryToCreateTable</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Overrided user SQL query to create table, if empty QxOrm library builds a default SQL query.  <a href="#afb3d2d5a9137471709c49f69830defc8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classqx_1_1_qx_soft_delete.html#a6a794b3eea9d7a11edab6b1f06ea153a">mode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_qx_soft_delete.html#a5b0af5f38bbe3e26adb6d3dc7b6eb81c">m_eMode</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Soft delete mode : 'mode_flag' with a boolean column, 'mode_date_time' with a date-time column containing deletion date-time.  <a href="#a5b0af5f38bbe3e26adb6d3dc7b6eb81c"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classqx_1_1_qx_soft_delete.html" title="qx::QxSoftDelete : soft delete (or logical delete) behavior to update a row into database (flag it as...">qx::QxSoftDelete</a> : soft delete (or logical delete) behavior to update a row into database (flag it as deleted) instead of delete it from database </p>
<p>A soft delete doesn't remove rows from database (this is not a physical delete) : a new column is added to the table definition to flag a row as deleted or not. This column can contain a boolean (1 means row deleted, 0 or NULL means row not deleted), or can contain deletion date-time (if empty or NULL, row is not deleted). So you can reactivate a deleted row by setting NULL or empty value into database.</p>
<p>To define a soft delete behavior with QxOrm library, you have to use the class <a class="el" href="classqx_1_1_qx_soft_delete.html" title="qx::QxSoftDelete : soft delete (or logical delete) behavior to update a row into database (flag it as...">qx::QxSoftDelete</a> in function mapping by class <a class="el" href="group___qx_register.html#ga0901390a4be805bbd1c555405d13bb5f" title="qx::register_class&lt;T&gt;(T &amp; t) : specialize this template to register a class of type T into QxOrm cont...">qx::register_class&lt;T&gt;</a>. Here is an example with the class <em>Bar</em> containing 2 properties <em>m_id</em> and <em>m_desc</em> : </p>
<div class="fragment"><pre class="fragment"><span class="keyword">namespace </span>qx {
<span class="keyword">template</span> &lt;&gt; <span class="keywordtype">void</span> <a class="code" href="group___qx_register.html#ga0901390a4be805bbd1c555405d13bb5f" title="qx::register_class&lt;T&gt;(T &amp; t) : specialize this template to register a class of type T into QxOrm cont...">register_class</a>(QxClass&lt;Bar&gt; &amp; t)
{
   t.setSoftDelete(<a class="code" href="classqx_1_1_qx_soft_delete.html" title="qx::QxSoftDelete : soft delete (or logical delete) behavior to update a row into database (flag it as...">qx::QxSoftDelete</a>(<span class="stringliteral">&quot;deleted_at&quot;</span>));

   t.id(&amp; Bar::m_id, <span class="stringliteral">&quot;id&quot;</span>);
   t.data(&amp; Bar::m_desc, <span class="stringliteral">&quot;desc&quot;</span>);
}}
</pre></div><p>SQL queries builded by QxOrm library will take into account this soft delete parameter to add conditions (don't fetch deleted item, don't delete physically a row, etc.). For example, if you execute this code with the class <em>Bar</em> : </p>
<div class="fragment"><pre class="fragment">Bar_ptr pBar; pBar.reset(<span class="keyword">new</span> Bar());
pBar-&gt;setId(5);
QSqlError daoError = <a class="code" href="group___qx_dao.html#ga298e15a5e745ae43d99de9b4279aca3e" title="Delete a line (or list of lines) of a table (database) mapped to a C++ object of type T (registered i...">qx::dao::delete_by_id</a>(pBar);     <a class="code" href="_qx_macro_8h.html#a70ab6c4ed8eb3e23107f171e0b41d612">qAssert</a>(! daoError.isValid());
<a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> bDaoExist = <a class="code" href="group___qx_cache.html#ga1b3b7fe7db7920493f40d0adb9c4957e" title="Return true if the cache contains an object associated with key sKey; otherwise return false...">qx::dao::exist</a>(pBar);             <a class="code" href="_qx_macro_8h.html#a70ab6c4ed8eb3e23107f171e0b41d612">qAssert</a>(! bDaoExist);
daoError = qx::dao::delete_all&lt;Bar&gt;();                <a class="code" href="_qx_macro_8h.html#a70ab6c4ed8eb3e23107f171e0b41d612">qAssert</a>(! daoError.isValid());
<span class="keywordtype">long</span> lBarCount = qx::dao::count&lt;Bar&gt;();               <a class="code" href="_qx_macro_8h.html#a70ab6c4ed8eb3e23107f171e0b41d612">qAssert</a>(lBarCount == 0);
daoError = qx::dao::destroy_all&lt;Bar&gt;();               <a class="code" href="_qx_macro_8h.html#a70ab6c4ed8eb3e23107f171e0b41d612">qAssert</a>(! daoError.isValid());
</pre></div><p>You will obtain following output trace : </p>
<div class="fragment"><pre class="fragment">[QxOrm] sql query (93 ms) : UPDATE Bar SET deleted_at = <span class="stringliteral">&#39;20110617115148615&#39;</span> WHERE id = :id
[QxOrm] sql query (0 ms) : SELECT Bar.id AS Bar_id_0, Bar.deleted_at FROM Bar WHERE Bar.id = :id AND (Bar.deleted_at IS NULL OR Bar.deleted_at = <span class="stringliteral">&#39;&#39;</span>)
[QxOrm] sql query (78 ms) : UPDATE Bar SET deleted_at = <span class="stringliteral">&#39;20110617115148724&#39;</span>
[QxOrm] sql query (0 ms) : SELECT COUNT(*) FROM Bar WHERE (Bar.deleted_at IS NULL OR Bar.deleted_at = <span class="stringliteral">&#39;&#39;</span>)
[QxOrm] sql query (110 ms) : DELETE FROM Bar
</pre></div><p><em>Note :</em> To delete physically a row from database, you have to use followings functions : <a class="el" href="group___qx_dao.html#ga776e2edd2da36029cddc13e9e6e366f5" title="Destroy a line (or list of lines) of a table (database) mapped to a C++ object of type T (registered ...">qx::dao::destroy_by_id()</a> and <a class="el" href="group___qx_dao.html#ga075cc9ac81c4cf65fb67d3d286a1de76" title="Destroy all lines of a table (database) mapped to a C++ class T (registered into QxOrm context)...">qx::dao::destroy_all()</a>.</p>
<p><em>Other note :</em> it is recommended to define into database an index on column <em>deleted_at</em> to optimize execution of SQL queries. </p>

<p>Definition at line <a class="el" href="_qx_soft_delete_8h_source.html#l00096">96</a> of file <a class="el" href="_qx_soft_delete_8h_source.html">QxSoftDelete.h</a>.</p>
</div><hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="a6a794b3eea9d7a11edab6b1f06ea153a"></a><!-- doxytag: member="qx::QxSoftDelete::mode" ref="a6a794b3eea9d7a11edab6b1f06ea153a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classqx_1_1_qx_soft_delete.html#a6a794b3eea9d7a11edab6b1f06ea153a">qx::QxSoftDelete::mode</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a6a794b3eea9d7a11edab6b1f06ea153aa11d2d9195b9aebf7c74f90f951bbae69"></a><!-- doxytag: member="mode_flag" ref="a6a794b3eea9d7a11edab6b1f06ea153aa11d2d9195b9aebf7c74f90f951bbae69" args="" -->mode_flag</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a6a794b3eea9d7a11edab6b1f06ea153aaa6026166a7c346ac77896d71d8e0816d"></a><!-- doxytag: member="mode_date_time" ref="a6a794b3eea9d7a11edab6b1f06ea153aaa6026166a7c346ac77896d71d8e0816d" args="" -->mode_date_time</em>&nbsp;</td><td>
</td></tr>
</table>
</dd>
</dl>

<p>Definition at line <a class="el" href="_qx_soft_delete_8h_source.html#l00101">101</a> of file <a class="el" href="_qx_soft_delete_8h_source.html">QxSoftDelete.h</a>.</p>

</div>
</div>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a7e49357973b451cb50a0acae4f996ef4"></a><!-- doxytag: member="qx::QxSoftDelete::QxSoftDelete" ref="a7e49357973b451cb50a0acae4f996ef4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">qx::QxSoftDelete::QxSoftDelete </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a816d67d204827448a4c234785b0b410d"></a><!-- doxytag: member="qx::QxSoftDelete::QxSoftDelete" ref="a816d67d204827448a4c234785b0b410d" args="(const QString &amp;sColumn)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">qx::QxSoftDelete::QxSoftDelete </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>sColumn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ab1d9d6eda63d04035a395ccc5ccadd46"></a><!-- doxytag: member="qx::QxSoftDelete::QxSoftDelete" ref="ab1d9d6eda63d04035a395ccc5ccadd46" args="(const QString &amp;sColumn, mode eMode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">qx::QxSoftDelete::QxSoftDelete </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>sColumn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classqx_1_1_qx_soft_delete.html#a6a794b3eea9d7a11edab6b1f06ea153a">mode</a>&#160;</td>
          <td class="paramname"><em>eMode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aea32113e4ed3c93080ccc5755209dc52"></a><!-- doxytag: member="qx::QxSoftDelete::~QxSoftDelete" ref="aea32113e4ed3c93080ccc5755209dc52" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">qx::QxSoftDelete::~QxSoftDelete </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aedaf8b286967a621b7c15db6deafe567"></a><!-- doxytag: member="qx::QxSoftDelete::buildSqlQueryToCreateTable" ref="aedaf8b286967a621b7c15db6deafe567" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString qx::QxSoftDelete::buildSqlQueryToCreateTable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="acfe4afc28ace99a33a774447a73e81c7"></a><!-- doxytag: member="qx::QxSoftDelete::buildSqlQueryToFetch" ref="acfe4afc28ace99a33a774447a73e81c7" args="(const QString &amp;sTable=QString()) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString qx::QxSoftDelete::buildSqlQueryToFetch </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>sTable</em> = <code>QString()</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a5a25cd00c63711bbcd6638bca97040c3"></a><!-- doxytag: member="qx::QxSoftDelete::buildSqlQueryToUpdate" ref="a5a25cd00c63711bbcd6638bca97040c3" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString qx::QxSoftDelete::buildSqlQueryToUpdate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a793d37737e8e7a76aef407e5e39d2195"></a><!-- doxytag: member="qx::QxSoftDelete::buildSqlTablePointName" ref="a793d37737e8e7a76aef407e5e39d2195" args="(const QString &amp;sTable=QString()) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString qx::QxSoftDelete::buildSqlTablePointName </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>sTable</em> = <code>QString()</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a9891f7ba304a031b28eeff680c0cb419"></a><!-- doxytag: member="qx::QxSoftDelete::getColumnName" ref="a9891f7ba304a031b28eeff680c0cb419" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString qx::QxSoftDelete::getColumnName </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a6d37d5b614a1e1a2e19eb4b4357aefed"></a><!-- doxytag: member="qx::QxSoftDelete::getMode" ref="a6d37d5b614a1e1a2e19eb4b4357aefed" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classqx_1_1_qx_soft_delete.html#a6a794b3eea9d7a11edab6b1f06ea153a">mode</a> qx::QxSoftDelete::getMode </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="af01bab27ed138ac8464ee46e29031908"></a><!-- doxytag: member="qx::QxSoftDelete::getSqlQueryToCreateTable" ref="af01bab27ed138ac8464ee46e29031908" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString qx::QxSoftDelete::getSqlQueryToCreateTable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ab7fb7cfc186d051d0a53070ca6a83828"></a><!-- doxytag: member="qx::QxSoftDelete::getSqlQueryToFetch" ref="ab7fb7cfc186d051d0a53070ca6a83828" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString qx::QxSoftDelete::getSqlQueryToFetch </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ae9b9b56b123b9cccdcceab8769de1de8"></a><!-- doxytag: member="qx::QxSoftDelete::getSqlQueryToUpdate" ref="ae9b9b56b123b9cccdcceab8769de1de8" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString qx::QxSoftDelete::getSqlQueryToUpdate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a8ae62bc1d975bc062a1111d473915ce1"></a><!-- doxytag: member="qx::QxSoftDelete::getTableName" ref="a8ae62bc1d975bc062a1111d473915ce1" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString qx::QxSoftDelete::getTableName </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a217c44a367c086bc8875f696cc6a563a"></a><!-- doxytag: member="qx::QxSoftDelete::isEmpty" ref="a217c44a367c086bc8875f696cc6a563a" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool qx::QxSoftDelete::isEmpty </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a91e15be206be59bde4a58888ab27d083"></a><!-- doxytag: member="qx::QxSoftDelete::setColumnName" ref="a91e15be206be59bde4a58888ab27d083" args="(const QString &amp;sColumn)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void qx::QxSoftDelete::setColumnName </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>sColumn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ad378d7962f669c70c010dc72763a5151"></a><!-- doxytag: member="qx::QxSoftDelete::setMode" ref="ad378d7962f669c70c010dc72763a5151" args="(mode eMode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void qx::QxSoftDelete::setMode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classqx_1_1_qx_soft_delete.html#a6a794b3eea9d7a11edab6b1f06ea153a">mode</a>&#160;</td>
          <td class="paramname"><em>eMode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aac330136e9f3b673f7ce852e65d3f91d"></a><!-- doxytag: member="qx::QxSoftDelete::setSqlQueryToCreateTable" ref="aac330136e9f3b673f7ce852e65d3f91d" args="(const QString &amp;s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void qx::QxSoftDelete::setSqlQueryToCreateTable </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a8a2fd4b776e9bcbd475e7d38b04b2faa"></a><!-- doxytag: member="qx::QxSoftDelete::setSqlQueryToFetch" ref="a8a2fd4b776e9bcbd475e7d38b04b2faa" args="(const QString &amp;s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void qx::QxSoftDelete::setSqlQueryToFetch </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a6a94b8ab9eaeb6e59d678462062b3061"></a><!-- doxytag: member="qx::QxSoftDelete::setSqlQueryToUpdate" ref="a6a94b8ab9eaeb6e59d678462062b3061" args="(const QString &amp;s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void qx::QxSoftDelete::setSqlQueryToUpdate </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a60ac45e661187ea2e4aef088322cbb76"></a><!-- doxytag: member="qx::QxSoftDelete::setTableName" ref="a60ac45e661187ea2e4aef088322cbb76" args="(const QString &amp;sTable)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void qx::QxSoftDelete::setTableName </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>sTable</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a5b0af5f38bbe3e26adb6d3dc7b6eb81c"></a><!-- doxytag: member="qx::QxSoftDelete::m_eMode" ref="a5b0af5f38bbe3e26adb6d3dc7b6eb81c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classqx_1_1_qx_soft_delete.html#a6a794b3eea9d7a11edab6b1f06ea153a">mode</a> <a class="el" href="classqx_1_1_qx_soft_delete.html#a5b0af5f38bbe3e26adb6d3dc7b6eb81c">qx::QxSoftDelete::m_eMode</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Soft delete mode : 'mode_flag' with a boolean column, 'mode_date_time' with a date-time column containing deletion date-time. </p>

<p>Definition at line <a class="el" href="_qx_soft_delete_8h_source.html#l00110">110</a> of file <a class="el" href="_qx_soft_delete_8h_source.html">QxSoftDelete.h</a>.</p>

</div>
</div>
<a class="anchor" id="a96138dfa61b315dad3353541ae2d7acd"></a><!-- doxytag: member="qx::QxSoftDelete::m_sColumn" ref="a96138dfa61b315dad3353541ae2d7acd" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString <a class="el" href="classqx_1_1_qx_soft_delete.html#a96138dfa61b315dad3353541ae2d7acd">qx::QxSoftDelete::m_sColumn</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Column name to store soft delete information. </p>

<p>Definition at line <a class="el" href="_qx_soft_delete_8h_source.html#l00106">106</a> of file <a class="el" href="_qx_soft_delete_8h_source.html">QxSoftDelete.h</a>.</p>

</div>
</div>
<a class="anchor" id="afb3d2d5a9137471709c49f69830defc8"></a><!-- doxytag: member="qx::QxSoftDelete::m_sSqlQueryToCreateTable" ref="afb3d2d5a9137471709c49f69830defc8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString <a class="el" href="classqx_1_1_qx_soft_delete.html#afb3d2d5a9137471709c49f69830defc8">qx::QxSoftDelete::m_sSqlQueryToCreateTable</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Overrided user SQL query to create table, if empty QxOrm library builds a default SQL query. </p>

<p>Definition at line <a class="el" href="_qx_soft_delete_8h_source.html#l00109">109</a> of file <a class="el" href="_qx_soft_delete_8h_source.html">QxSoftDelete.h</a>.</p>

</div>
</div>
<a class="anchor" id="a587b25ab60a14ca67527dd4ba3f98032"></a><!-- doxytag: member="qx::QxSoftDelete::m_sSqlQueryToFetch" ref="a587b25ab60a14ca67527dd4ba3f98032" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString <a class="el" href="classqx_1_1_qx_soft_delete.html#a587b25ab60a14ca67527dd4ba3f98032">qx::QxSoftDelete::m_sSqlQueryToFetch</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Overrided user SQL query to fetch an item, if empty QxOrm library builds a default SQL query. </p>

<p>Definition at line <a class="el" href="_qx_soft_delete_8h_source.html#l00107">107</a> of file <a class="el" href="_qx_soft_delete_8h_source.html">QxSoftDelete.h</a>.</p>

</div>
</div>
<a class="anchor" id="ad5ac6cc751306623e019c065cefc8cd6"></a><!-- doxytag: member="qx::QxSoftDelete::m_sSqlQueryToUpdate" ref="ad5ac6cc751306623e019c065cefc8cd6" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString <a class="el" href="classqx_1_1_qx_soft_delete.html#ad5ac6cc751306623e019c065cefc8cd6">qx::QxSoftDelete::m_sSqlQueryToUpdate</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Overrided user SQL query to update an item, if empty QxOrm library builds a default SQL query. </p>

<p>Definition at line <a class="el" href="_qx_soft_delete_8h_source.html#l00108">108</a> of file <a class="el" href="_qx_soft_delete_8h_source.html">QxSoftDelete.h</a>.</p>

</div>
</div>
<a class="anchor" id="a47ff4d3c3a26e02c278dd7724205b665"></a><!-- doxytag: member="qx::QxSoftDelete::m_sTable" ref="a47ff4d3c3a26e02c278dd7724205b665" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString <a class="el" href="classqx_1_1_qx_soft_delete.html#a47ff4d3c3a26e02c278dd7724205b665">qx::QxSoftDelete::m_sTable</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Table name where soft delete behavior is applied. </p>

<p>Definition at line <a class="el" href="_qx_soft_delete_8h_source.html#l00105">105</a> of file <a class="el" href="_qx_soft_delete_8h_source.html">QxSoftDelete.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>C:/Dvlp/_Perso/QxOrm/include/QxDao/<a class="el" href="_qx_soft_delete_8h_source.html">QxSoftDelete.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceqx.html">qx</a>      </li>
      <li class="navelem"><a class="el" href="classqx_1_1_qx_soft_delete.html">QxSoftDelete</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">Generated on Sun Dec 11 2016 13:41:13 for QxOrm by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
